<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    

    span {
        display: inline-block;
        width: 70px;
        height: 40px;
        border: 1px solid brown;
        line-height: 40px;
        text-align: center;
        border-radius: 4px;
        margin: -8px;
        
        box-shadow: 1px 1px 1px rgba(125, 104, 117);
    }
</style>

<body>



    <script>
        let row = +prompt('请输入要打印的行数')
        for (let i = 1; i <= row; i++) {
            for (let j = 1; j <= i; j++) {
                document.write(`<span>${j}&times${i}=${i * j}</span>`)
                document.write('&nbsp&nbsp&nbsp&nbsp')
                if (i === j) {
                    document.write(`<br>`)
                }
            }
            document.write(`<br>`)
        }
    </script>
</body>

</html>